package com.cy.com.cy;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@interface Entity{
    String value() default "";
}

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD,ElementType.METHOD})
@interface ID{
    String value() default "";
}

@Entity("t_user")
class User{
    @ID("uid")
    private Integer id;
}

public class Annotation {
    public static void main(String[] args) {
       String Entity= User.class.getAnnotation(Entity.class).value();
        System.out.println(Entity);
        String s="";
        System.out.println(s);

    }
}